// pages/information_list/information_list.js
const app = getApp(), core = require('../../utils/core'), util = require('../../utils/util');
Page({

  /**
   * 页面的初始数据
   */
  data: {
    auto:true,
    newsBanners: [],
    current:0,
    newsList: [],
    moreButton: {page:1},
  },
  swiperchange:function(e){
    this.setData({
      current:e.detail.current
    })
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    let page = this;
    // core.get({url: '/news/banner',success(ret,response){page.setData({newsBanners:ret.data.list})}});
    this.fetch();
  },

  fetch() {
    util.fetch(this, '/xilujob.news/announcement', {}, 'moreButton', 'newsList', 'data');
  }
});
